package com.jeyhun.android.StressApps;

import android.app.Activity;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;
import android.widget.MediaController;
import android.widget.VideoView;
import android.view.View;
import android.content.Context;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.video);
        
        VideoView videoView = (VideoView) findViewById(R.id.VideoView);
        MediaController mediaController = new MediaController(this);
        mediaController.setAnchorView(videoView);
        // Set video link (mp4 format )
        //Uri video = Uri.parse("C:/Users/siempre/Documents/My Dropbox/Android/StresssApps/res/raw/heart.mp4");
        videoView.setMediaController(mediaController);
        videoView.setVideoPath("C:/Users/siempre/Documents/My Dropbox/Android/StresssApps/res/raw/heart.mp4");
        //videoView.setVideoURI(video);
        videoView.start();
        
        /*final Button initFirstImage;
        
        initFirstImage = (Button)this.findViewById(R.id.button1);
        initFirstImage.setOnClickListener(new Button.OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				Context context = getApplicationContext();
				
				//MediaPlayer mp = MediaPlayer.create(context, R.raw.heart);
				//mp.start();
				
			}
        	
        	
        	
        	
        });*/
    }
}